package com.gene.mapper;

import com.gene.pojo.TbItem;
import com.gene.pojo.TbItemExample;
import java.util.List;

import com.gene.pojo.entity.Product;
import org.apache.ibatis.annotations.Param;

public interface TbItemMapper {
    /**
     *  商品的查询，带多条件查询
     *  参数为tbItem
     *  1: 参数  id（商品id） 查询单个数据
     *  2：参数  hot=1   查询热门的数据  有排序
     *  3：参数  cid   按照cid（类型）来查询
     *
     *  注意 所有数据 status（商品状态）=1（正常）
     */
    List<TbItem> tbItemLsit(TbItem tbItem);


    /**
     * 根据商品id联合查询   返回结果为Product类 = TbItem  +TbItemDesc
     * @param tbItem
     * @return
     */
    Product selectId(TbItem tbItem);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int countByExample(TbItemExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int deleteByExample(TbItemExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int insert(TbItem record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int insertSelective(TbItem record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    List<TbItem> selectByExample(TbItemExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    TbItem selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int updateByExampleSelective(@Param("record") TbItem record, @Param("example") TbItemExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int updateByExample(@Param("record") TbItem record, @Param("example") TbItemExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int updateByPrimaryKeySelective(TbItem record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_item
     *
     * @mbggenerated Wed Jan 10 09:44:34 CST 2018
     */
    int updateByPrimaryKey(TbItem record);
}